﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace vue
{
    public partial class Form3 : Form
    {
        public bool ok;

        public Form3()
        {
            ok = false;
            InitializeComponent();
        }

        private void Annuler_Click(object sender, EventArgs e)
        {   
            this.Close();
        }

        private void OK_Click(object sender, EventArgs e)
        {
            inkEdit1.Recognize();
            ok = true;
            this.Close();
        }


        public string InputResponse
        {
            get { return this.inkEdit1.Text; }
        }

        public static string InputBox()
        {
            Form3 input = new Form3();


            if (input.ShowDialog() != DialogResult.OK)
                {
                    if (input.ok)
                    { //cas ou l'utilisateur clic sur entrée
                        input.inkEdit1.Recognize();
                        return input.inkEdit1.Text;
                    }else{
                        //cas ou l'utilisateur clic sur annuler
                        return "";
                    }
                }
                else
                {
                    return "";
                }
        }


    }
}
